import requests
headers={
    "user-agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36"
    }
def urldownload(url):
    try:
        r=requests.get(url,headers=headers)
        r.encoding =r.apparent_encoding
        if r.status_code==200:
            return r.text
        else:
            return None
    except:
        return None
